package com.hzsk.lisence.entity;

import com.sun.jna.Structure;

import java.util.Arrays;
import java.util.List;

/**
 * @Description : 获取授权文件参数-证书文件校验信息
 * @Date : 2024/8/29
 * @Author : ChenJin
 * @Version : v1.0.0
 **/
@Structure.FieldOrder({"certificator","userName","hardwareInfo","exp","nbf"})
public class FA_VerifyInfo extends Structure{

    /**
     * 证书文件签发这名称
     */
    public byte[] certificator;

    /**
     * userName
     */
    public byte[] userName;

    /**
     * 硬件信息
     */
    public byte[] hardwareInfo;

    /**
     * 授权结束时间
     */
    public byte[] exp;

    /**
     * 授权开始时间
     */
    public byte[] nbf;
    
    public FA_VerifyInfo(){
        super(ALIGN_DEFAULT);
        this.certificator = new  byte[33];
        this.userName = new byte[33];
        this.hardwareInfo = new byte[65];
        this.exp = new byte[9];
        this.nbf = new byte[9];
    }

    public static class ByValue extends FA_VerifyInfo implements Structure.ByValue{};
    
    @Override
    protected List<String> getFieldOrder(){
        return Arrays.asList("certificator","userName","hardwareInfo","exp","nbf");
    }

}
